package com.xhd.db;

import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class BizObjFields {
	 HashMap jm457 = null;

	  public BizObjFields()
	  {
	  }

	  public BizObjFields(Map paramMap)
	  {
	    if (paramMap == null)
	      return;
	    this.jm457.putAll(paramMap);
	  }

	  public int size()
	  {
	    return this.jm457.size();
	  }

	  public void put(String paramString, int paramInt)
	  {
	    this.jm457.put(paramString, new Integer(paramInt));
	  }

	  public boolean hasField(String paramString)
	  {
	    return this.jm457.containsKey(paramString);
	  }

	  public void remove(String paramString)
	  {
	    this.jm457.remove(paramString);
	  }

	  public void remove(List paramList)
	  {
	    if (paramList == null)
	      return;
	    int i = paramList.size();
	    for (int j = 0; j < i; ++j)
	    {
	      String str = ((String)paramList.get(j)).toLowerCase();
	      this.jm457.remove(str);
	    }
	  }

	  public int getJdbcType(String paramString)
	  {
	    Integer localInteger = (Integer)this.jm457.get(paramString);
	    if (localInteger == null)
	      return 0;
	    return localInteger.intValue();
	  }

	  public String getJavaType(String paramString)
	  {
	    Integer localInteger = (Integer)this.jm457.get(paramString);
	    if (localInteger == null)
	      return null;
	    return DBUtil.dbTypeToJavaType(localInteger.intValue());
	  }

	  public BizObjFields subFields(List paramList)
	  {
	    if (paramList == null)
	      return null;
	    BizObjFields localBizObjFields = new BizObjFields();
	    int i = paramList.size();
	    for (int j = 0; j < i; ++j)
	    {
	      String str = ((String)paramList.get(j)).toLowerCase();
	      Object localObject = this.jm457.get(str);
	      if (localObject == null)
	        continue;
	      localBizObjFields.jm457.put(str, localObject);
	    }
	    if (localBizObjFields.size() < 1)
	    {
	      localBizObjFields = null;
	      return null;
	    }
	    return localBizObjFields;
	  }

	  public Set fieldSet()
	  {
	    return this.jm457.keySet();
	  }

	  public void toMapJavaType(Map paramMap)
	  {
	    Iterator localIterator = this.jm457.keySet().iterator();
	    while (localIterator.hasNext())
	    {
	      String str = (String)localIterator.next();
	      paramMap.put(str, getJavaType(str));
	    }
	  }

	  public BizObjFields cloneInstance()
	  {
	    BizObjFields localBizObjFields = new BizObjFields();
	    localBizObjFields.jm457.putAll(this.jm457);
	    return localBizObjFields;
	  }
}
